<template>
	<view class="tradeRecord">
		<image src="/static/1.jpg" mode="aspectFill" class="avatar"></image>
		<view class="flex next">
			<view>
				<view class="h2">金刚葫芦娃</view>
				<text>跟随交易员</text>
			</view>
			<view>
				<view class="h2">0.000000</view>
				<text>跟随收益</text>
			</view>
		</view>
		<view class="tabs flex-around">
			<view :class="{active:tabIndex == 0}" @click="changeTab(0)">正在持仓</view>
			<view :class="{active:tabIndex == 1}" @click="changeTab(1)">历史记录</view>
		</view>
		<empty title="暂时无记录" desc="暂无数据"></empty>
	</view>
</template>

<script>
	import Empty from '@/components/empty.vue'
	export default {
		components:{
			Empty
		},
		data() {
			return {
				tabIndex:0
			}
		},
		methods: {
			changeTab(index){
				this.tabIndex = index;
			}
		}
	}
</script>

<style lang="less">
	page{
		background: white;
	}
	@color:#d4237a;
	.tradeRecord{
		padding: 30rpx;
		.avatar{
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
		}
		.next{
			padding: 24rpx 0;
			text{
				font-size: 24rpx;
				color:#999;
			}
			.h2{
				font-size: 40rpx;
			}
			&>view{
				width: 40%;
			}
			
		}
		.tabs{
			margin-top: 20rpx;
			view{
				font-size: 30rpx;
				font-weight: bold;
				color:#999;
				height: 55rpx;
				&.active{
					color:#000;
					position: relative;
					&::after{
						content:"";
						display: block;
						position: absolute;
						width: 40rpx;
						height: 4rpx;
						background: @color;
						bottom:0;
						left:calc(50% - 20rpx);
					}
				}
			}
		}
		/deep/.empty{
			margin-top: 0;
		}
	}
</style>
